package com.aya.aop.asp.impl;

import com.aya.aop.asp.AopAnnotation;
import com.aya.aop.asp.InterfaceBean;
import org.springframework.aop.framework.AopContext;
//@Scope("prototype")
//@Service
public class InterfaceImplPrototypeBean implements InterfaceBean {

    @Override
    @AopAnnotation
    public void joke() {
        System.out.println("讲笑话");
    }

    public String targetAdvice() {
        InterfaceImplPrototypeBean interfaceImplBean = (InterfaceImplPrototypeBean)AopContext.currentProxy();
        interfaceImplBean.joke();
        System.out.println("return str");
        return "result";
    }
}
